<?php
class ConfAction extends Action{
    public function __construct()
    {
        parent::__construct();
        $this->setAssign();
    }

    public function setAssign()
    {
        $domain         = getDomain();
        $domainLen      = count($domain);
        //一级域名
        $this->assign('baseDomain', $domainLen > 1 ? "{$domain[$domainLen-2]}.{$domain[$domainLen-1]}" : "");
    }
}